#include <dht11.h>
#define DHT11PIN 10
dht11 DHT11;

float getTemp(void){
  float tempDHT = -255;
  int chk = DHT11.read(DHT11PIN);
  delay(1);
  if(chk==0) {
    tempDHT=(float)DHT11.temperature;
  }
  return tempDHT; 
}

void printTemp(void)
{   
  Serial.print("Temperature is: ");
  Serial.println(getTemp());  
}

